@echo off

set PARENT_INSTALL_PATH=D:\Program Files
set INSTALL_PATH=%PARENT_INSTALL_PATH%\EditUltra

if not exist "%PARENT_INSTALL_PATH%" (
	mkdir "%PARENT_INSTALL_PATH%"
)

if not exist "%INSTALL_PATH%" (
	mkdir "%INSTALL_PATH%"
)

if not exist "EditUltra.exe" (
	echo *** ERROR : EditUltra.exe not found
	exit 1
) else (
	echo "copy EditUltra.exe %INSTALL_PATH%\"
	copy "EditUltra.exe" "%INSTALL_PATH%\"
)

if not exist "%INSTALL_PATH%\conf" (
	mkdir "%INSTALL_PATH%\conf"
)
echo "xcopy conf\*.conf %INSTALL_PATH%\conf\"
xcopy /Y "conf\*.conf" "%INSTALL_PATH%\conf\"

if not exist "%INSTALL_PATH%\test" (
	mkdir "%INSTALL_PATH%\test"
)
echo "xcopy test\*.* %INSTALL_PATH%\test\"
xcopy /Y "test\*.*" "%INSTALL_PATH%\test\"

copy /Y AUTHORS "%INSTALL_PATH%\"
copy /Y ChangeLog-CN "%INSTALL_PATH%\"
copy /Y LICENSE "%INSTALL_PATH%\"
copy /Y LICENSE "%INSTALL_PATH%\"
copy /Y README.md "%INSTALL_PATH%\"
copy /Y README.zh-CN.md "%INSTALL_PATH%\"

copy "D:\Work\scintilla-4.3.2\bin\SciLexer.dll" "%INSTALL_PATH%\"

copy "D:\Work\openssl-1.1.1-win64\bin\libcrypto-1_1-x64.dll" "%INSTALL_PATH%\"
copy "D:\Work\openssl-1.1.1-win64\bin\libssl-1_1-x64.dll" "%INSTALL_PATH%\"

copy "D:\Work\pcre-8.42-win32\shared\bin\pcre.dll" "%INSTALL_PATH%\"

copy "D:\Work\curl-7.70.0-win64-mingw\bin\libcurl-x64.dll" "%INSTALL_PATH%\"

pause
